Google News
logo
ReactJS - Quiz(MCQ)
What is the difference between the click behaviors of these two buttons (assuming that this.handleClick is bound correctly)?
A. <button onClick="{this.handleClick}>Click Me</button>"
B. <button onClick="{event => this.handleClick(event)}}>Click Me</button>"
A)
Button A will not have access to the event object on click of the button.
B)
Button B will not fire the handler this.handleClick successfully.
C)
Button A will not fire the handler this.handleClick successfully.
D)
There is no difference

Correct Answer :   Button B will not fire the handler this.handleClick successfully.